<?php

// Error reporting.
// NOTE: This should be handled by Core\Main in the future.
error_reporting( E_ALL | E_STRICT );
ini_set( 'display_errors', 'on' );

require "../app/Library/Core/Main.php";

// Autoload classes.
function __autoload ( $strClass ) {
    Core\Main::autoload( $strClass );
}

// Get an instance of Core\Main -- our application.
$Main = Core\Main::getInstance();

//$URL = new Core\StringHandling\URL ( "http://www.eksempel.no/dette/er/en/artikkel/index.php?some=var&pluss=another" );
$URL = new Core\StringHandling\URL ( Core\StringHandling\REQUEST_URI );

echo "<br><br>";

echo "Protocol: " . $URL->Protocol . "<br>";
echo "Host: " . $URL->Host . "<br>";
echo "Filename: " . $URL->Filename . "<br>";

print_r( $URL->PathSegments );

echo "Request URI: " . $_SERVER['REQUEST_URI'] . "<br>";

echo "Complete URL: " . $URL;

?>
